<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改动力电池信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${tPowerBatteryInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">电池编号：</label>
                    <div class="col-sm-8">
                        <input name="batteryNumber" th:field="*{batteryNumber}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">单体型号：</label>
                    <div class="col-sm-8">
                        <input name="cellModel" th:field="*{cellModel}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">模组型号：</label>
                    <div class="col-sm-8">
                        <input name="moduleModel" th:field="*{moduleModel}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">箱体型号：</label>
                    <div class="col-sm-8">
                        <select name="boxModel" class="form-control" th:with="type=${@dict.getType('box_model')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{boxModel}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">额定能量 Wh：</label>
                    <div class="col-sm-8">
                        <input name="ratedEnergy" th:field="*{ratedEnergy}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">序列号：</label>
                    <div class="col-sm-8">
                        <input name="serialNumber" th:field="*{serialNumber}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">生产厂家：</label>
                    <div class="col-sm-8">
                        <select name="manufacturer" class="form-control" th:with="type=${@dict.getType('manufacturer')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{manufacturer}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
            }
        }
    </script>
</body>
</html>